// @ts-ignore

 
import { api } from '@/utils/api';

/** 新增设备信息数据 POST /equInfo/add */
export async function equInfoAdd(
  body: BIZAPI.EquInfoCreateReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function equInfoAdd(
  body: BIZAPI.EquInfoCreateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function equInfoAdd(
  body: BIZAPI.EquInfoCreateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function equInfoAdd(
  body: BIZAPI.EquInfoCreateReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/equInfo/add`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultObject>(`/app/equInfo/add`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 删除设备信息数据 POST /equInfo/delete */
export async function equInfoDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function equInfoDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function equInfoDelete(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function equInfoDelete(body: BIZAPI.ID, options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/equInfo/delete`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultObject>(`/app/equInfo/delete`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 获取设备信息数据 POST /equInfo/get */
export async function equInfoGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultEquInfoEntity>;

export async function equInfoGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultEquInfoEntity>>;

export async function equInfoGet(
  body: BIZAPI.ID,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultEquInfoEntity>;

export async function equInfoGet(body: BIZAPI.ID, options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultEquInfoEntity>(`/app/equInfo/get`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultEquInfoEntity>(`/app/equInfo/get`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 获取设备编号列表数据 POST /equInfo/getEquipmentCodeList */
export async function equInfoGetEquipmentCodeList(
  body: BIZAPI.GetEquipmentCodeListQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultListString>;

export async function equInfoGetEquipmentCodeList(
  body: BIZAPI.GetEquipmentCodeListQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultListString>>;

export async function equInfoGetEquipmentCodeList(
  body: BIZAPI.GetEquipmentCodeListQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultListString>;

export async function equInfoGetEquipmentCodeList(
  body: BIZAPI.GetEquipmentCodeListQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultListString>(`/app/equInfo/getEquipmentCodeList`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultListString>(`/app/equInfo/getEquipmentCodeList`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 获取设备名称列表数据 POST /equInfo/getEquipmentNameList */
export async function equInfoGetEquipmentNameList(
  body: BIZAPI.GetEquipmentNameListQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultListString>;

export async function equInfoGetEquipmentNameList(
  body: BIZAPI.GetEquipmentNameListQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultListString>>;

export async function equInfoGetEquipmentNameList(
  body: BIZAPI.GetEquipmentNameListQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultListString>;

export async function equInfoGetEquipmentNameList(
  body: BIZAPI.GetEquipmentNameListQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultListString>(`/app/equInfo/getEquipmentNameList`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultListString>(`/app/equInfo/getEquipmentNameList`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 导入设备信息数据 POST /equInfo/import */
export async function equInfoImport(
  body: {},
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultVoid>;

export async function equInfoImport(
  body: {},
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultVoid>>;

export async function equInfoImport(
  body: {},
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultVoid>;

export async function equInfoImport(body: {}, options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultVoid>(`/app/equInfo/import`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultVoid>(`/app/equInfo/import`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 获取设备信息分页数据 POST /equInfo/page */
export async function equInfoPage(
  body: BIZAPI.EquInfoQuery,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultIPageEquInfoEntity>;

export async function equInfoPage(
  body: BIZAPI.EquInfoQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultIPageEquInfoEntity>>;

export async function equInfoPage(
  body: BIZAPI.EquInfoQuery,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultIPageEquInfoEntity>;

export async function equInfoPage(
  body: BIZAPI.EquInfoQuery,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultIPageEquInfoEntity>(`/app/equInfo/page`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultIPageEquInfoEntity>(`/app/equInfo/page`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}

/** 下载设备导入模板 POST /equInfo/template/download */
export async function equInfoTemplateDownload(options?: ArgumentsType<typeof api>[1]): Promise<any>;

export async function equInfoTemplateDownload(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<any>>;

export async function equInfoTemplateDownload(
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<any>;

export async function equInfoTemplateDownload(options?: ArgumentsType<typeof api>[1]) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<any>(`/app/equInfo/template/download`, {
      method: 'POST',
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<any>(`/app/equInfo/template/download`, {
    method: 'POST',
    ...(options || {})
  });
}

/** 更新设备信息数据 POST /equInfo/update */
export async function equInfoUpdate(
  body: BIZAPI.EquInfoUpdateReq,
  options?: ArgumentsType<typeof api>[1]
): Promise<BIZAPI.IResultObject>;

export async function equInfoUpdate(
  body: BIZAPI.EquInfoUpdateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: true }
): Promise<TupleResponse<BIZAPI.IResultObject>>;

export async function equInfoUpdate(
  body: BIZAPI.EquInfoUpdateReq,
  options?: ArgumentsType<typeof api>[1] & { tupleResponse: false }
): Promise<BIZAPI.IResultObject>;

export async function equInfoUpdate(
  body: BIZAPI.EquInfoUpdateReq,
  options?: ArgumentsType<typeof api>[1]
) {
  if (
    (
      options as ArgumentsType<typeof api>[1] & {
        tupleResponse: boolean;
      }
    )?.tupleResponse === true
  ) {
    return api<BIZAPI.IResultObject>(`/app/equInfo/update`, {
      method: 'POST',
      headers: {
        'Content-Type': 'application/json'
      },
      data: body,
      ...(options || {}),
      tupleResponse: true
    });
  }

  return api<BIZAPI.IResultObject>(`/app/equInfo/update`, {
    method: 'POST',
    headers: {
      'Content-Type': 'application/json'
    },
    data: body,
    ...(options || {})
  });
}
